package com.translation;

import java.io.File;
import java.io.IOException;
import java.io.Reader;

public class FileReader {

	public String read(File f) throws IOException {
		Reader r = null;
		try {
			r = new java.io.FileReader(f);
			StringBuilder sb = new StringBuilder();
			int c = 0;
			while ((c = r.read()) != -1) {
				sb.append((char) c);
			}
			return sb.toString();
		} finally {
			if (r != null) {
				r.close();
			}
		}
	}
}
